#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QTcpSocket>
#include <QCloseEvent>
#include <QDebug>
#include <iostream>
#include <QDir>
#include <QFileInfoList>
#include <fstream>
#include <QtGui>

namespace Ui {
class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT
    QTcpSocket* tcpsocket;
    QTcpSocket* pasv_socket;
    char buf[4096];
    QDir qdir;
public:
    explicit Widget(QWidget *parent = 0);
    ~Widget();
    QTcpSocket* pasv();
    void recv();
    void pasv_recv();
    void list();
    void list_cilent();

public slots:
    void on_pushButton_connect_clicked();

    void on_pushButton_put_clicked();

    void on_pushButton_get_clicked();

    void success_connect();

    void server_double_clicked();

    void client_double_clicked();

private:
    Ui::Widget *ui;
};

#endif // WIDGET_H
